#################
## README FILE ##
#################

## GENERAL INFORATION
Journal: Comparative Political Studies.
Paper title: Party System Congruence and Bicameralism.
Authors: Woooseok Kim, Allen Hicken, and Ken Kollman.

This document describes all code and data used to replicate the results and figures in the manuscript and online appendix.



## FILES
- "replication.do" contains the Stata code for estimating the models.
- "replication.R" contains the R code for plotting the figures.
- "data.csv" contains the data used in the estimation of the models.
**IMPORANT: The Stata code should be run prior to the R code since the R code uses the results from the Stata code.**



## SOFTWARE AND INSTRUCTIONS
The models in the paper are estimated using Stata version MP 18.0.
The figures in the paper are plotted using R version 4.3.3.

The code to install required packages are contained in the code files.

The results from Stata are stored in the sub-folder "Results".
The plots from R are stored in the sub-folder "Plots".



## CODEBOOK
The description of the variables in "data.csv" are provided below:
- id: country ID.
- ctr_n: country name.
- yr: year.
- lc_elec_year: dummmy variable that indicates whether a lower chamber election was held in a given year.
- uc_elec_year: dummmy variable that indicates whether a upper chamber election was held in a given year.
- pspn_congruence: partisan congruence.
- psns_congruence: nationalization congruence.
- v2lgdomchm: continuous measure of the relative strength of the upper chamber.
- v2lgdomchm_ord_dum: dummy variable that measures the relative strength of the upper chamber. Coded as 1 if the upper chamber is at least as powerful as the lower chamber.
- dm_ratio: ratio of lower chamber and upper chamber district magnitudes.
- seat_ratio: ratio of lower chamber and upper chamber seats.
- abs_time_diff: years and months between the most recent lower chamber and upper chamber election.
- partial_elec: dummy variable that indicates whether a lower chamber or upper chamber is partially renewed in an election.
- v2xnp_pres: presidentialism index, which measures the systemic concentration of power in the hands of one individual.
- yrs_since_pres: years between a presidential election and the most recent lower chamber or upper chamber election.
- wb_gov_spending: general government final consumption expenditure as percentage of GDP.
- wg_n_party: number of parties in government.
- mean_enp: mean effective number of parties in the lower chamber and upper chamber.
- ln_wb_unemp: unemployment (logged).
- ln_wb_trade: sum of imports and exports divided by GDP (logged).
- ln_wb_age: ratio of those younger than 15 or older than 64 to the working-age population (logged).
- ln_wb_gdppc: GDP per capita (logged).
- ln_wb_inflation: inflation rates (logged).
- cbie: central bank independence index.
- leftgov1: dummy variable that indicates whether the party in control of the executive is left-leaning.
- v2x_regime: regimes of the world measure where 0=closed autocracy, 1=electoral autocracy, 2=electoral democracy, and 3=liberal democracy.
